package com.itholmes.factory;

import com.itholmes.factory.原材料.Circle;
import com.itholmes.factory.原材料.Rectangle;
import com.itholmes.factory.原材料.Square;

public class ShapeFactory {
	public Shape getShape(String shapeType) {
		if(shapeType == null) {
			return null;
		}
		
		if(shapeType.equalsIgnoreCase("circle")) {
			return new Circle();
		}
		if(shapeType.equalsIgnoreCase("rectangle")) {
			return new Rectangle();
		}
		if(shapeType.equalsIgnoreCase("square")) {
			return new Square();
		}
		
		return null;
	}
}
